home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 …SCII & the Runetime Code / ADC Developer CD (1992-07) (''Butch ASCII And The Runtime Code'')_iso / Dev.CD 199207.iso / Tools & Apps / Devices & Hardware / A⁄ROSE / MessageDispatcher / MultiThread.Readme < prev    next >
Encoding:
Text File  |  1991-03-21  |  2.4 KB  |  75 lines  |  [TEXT/MPS ]

  1. Capability to issue multiple OpenQueues and have
  2.     multipe receives outstanding from within one
  3.     program (task) on the Macintosh.
  4.     
  5. There can be only one OpenQueue for each program
  6.     that is linked with IPCGlue.o.
  7.  
  8. The trick to achieve this is to have multiple copies
  9.     of programs linked with IPCGlue.o.
  10.     
  11. The sources files suppled with this note contain
  12.  
  13.     TestMultiThread.make    Make file for TestMultiThread
  14.     TestMultiThread.c        MPW Tool to demonstrate MultiThread
  15.     MultiThread.h            The header to be used to
  16.                             use the MultiThread facility
  17.     MultiThread.a            Assembly language program used
  18.                             to generate the MultiThread resource
  19.                             
  20.                             
  21. Operation:
  22.  
  23.     Make a small program linked with IPCGlue.o that
  24.         will put the addresses of A/ROSE prep routines
  25.         in a table.  Put this program in a resource
  26.         called "MultiThread" in user program.
  27.         
  28.     Call CreateQueue to read in this resource and set
  29.         up the Table to access the routines.
  30.         
  31.     Use the pointer to this queue table to acces the
  32.         various routines.
  33.         
  34.     Call DestoryQueue to dispose the table.
  35.     
  36.  
  37. Table format is:
  38.  
  39. struct QueueEntry {
  40.         Handle            rsrcHandle;            // Reserved area
  41.         void            (*CloseQueue)(void);
  42.         void            (*FreeMsg)(mMessage *msgPtr);
  43.         char            (*GetCard)(void);
  44.         unsigned long    (*GetETick)(void);
  45.         tid_type        (*GetICCTID)(void);
  46.         struct IPCg        *(*GetIPCg)(void);
  47.         mMessage        *(*GetMsg)(void);
  48.         tid_type        (*GetNameTID)(void);
  49.         unsigned short    (*GetTickPS)(void);
  50.         tid_type        (*GetTID)(void);
  51.         short            (*IsLocal)(char *address);
  52.         void            (*KillReceive)(void);
  53.         short            (*LockRealArea)(void *virtualAddr, unsigned long length,
  54.                                 struct addressareas buffer[], unsigned long count);
  55.         tid_type        (*Lookup_Task)(char *object, char *type, tid_type nm_TID,
  56.                                             unsigned short *index);
  57.         short            (*NetCopy)(tid_type srcTID, void *srcAddress,
  58.                                     tid_type dstTID, void *dstAddress,
  59.                                             unsigned long byteCount);
  60.         tid_type        (*OpenQueue)(void (*UserProcedure)(void));
  61.         mMessage        *(*Receive)(unsigned long mID, tid_type mFrom,
  62.                                         unsigned short mCode, long timeOut,
  63.                                         void (*CompletionRoutine)(mMessage *));
  64.         char            (*Register_Task)(char object[], char type[], short local_only);
  65.         void            (*Send)(mMessage *msgPtr);
  66.         void            (*SwapTID)(mMessage *msgPtr);
  67.         void            (*UnLockRealArea)(void *virtualAddr, unsigned long length);
  68. };
  69.  
  70. To build:
  71.  
  72.     Modify the make file so that the A/ROSE Include files come from
  73.         the right place.
  74.     Build and run the MPW tool.
  75.